1. Field of the Invention
The present invention relates to a technique for shifting a frequency (pitch) of an input sound signal by a given value and outputting the frequency-shifted sound signal in real time.
2. Description of the Related Art
Pitch shifting apparatuses have been used in karaoke (recorded orchestral accompaniment) apparatuses or the like for shifting a frequency (pitch) of an input sound such as an instrument sound or voice by a given value and outputting the frequency-shifted sound in real time. The pitch shifting apparatus converts an analog signal indicative of an input sound into a digital signal, writes the digital signal into a memory in sequence at a constant write speed, while reads the signal from the memory at a speed different from the write speed. then decodes the read-out signal for reproduction, so that a sound having a pitch different from that of the input sound is outputted.
For reading the signal from the memory, a sawtooth wave is used. Specifically, the signal is read by using a sawtooth wave as a reading waveform to designate read addresses. However, the signal thus read includes discontinuous points in many cases. For eliminating the discontinuous points, various measures have been taken.
For example, two sawtooth waves having a phase difference of 180xc2x0 from each other are used to designate read addresses thereby to read pitch-shifted signals from a memory. Then, with respect to the two signals thus read from the memory, two triangular waves synchronous with the sawtooth waves, respectively, are used to carry out amplitude modulation to cause levels at discontinuous points of the signals to be zero. Finally, the signals are added to each other to derive a pitch-shifted signal having no discontinuous points.
In the foregoing technique, however, since phases of the signals read from the memory do not always coincide with each other, the amplitude of the sum signal does not become constant. This adversely affects the tone quality as if amplitude modulation were effected.
In view of this, Japanese Laid-open (unexamined) Patent Publication No. 7-306693 proposes an improved technique, wherein read addresses are designated so that the two signals read from the memory have a section corresponding to a period of the foregoing triangular signals where the signals continuously have the mutually same values. Even in this technique, however, the foregoing adverse affect to the tone quality can not be fully eliminated.
Further, the foregoing conventional techniques both require two or more signal processing systems so that complicated circuit structures are resulted.
Therefore, it is an object of the present invention to provide a pitch shifting technique which is capable of producing a pitch-shifted sound free of the foregoing adverse affect to the tone quality with a simple structure.
According to one aspect of the present invention, there is provided a pitch shifting apparatus comprising a memory for storing an input sound signal; a period extracting means for extracting a period of the input sound signal; and an address designating means for producing a sawtooth wave having an amplitude set to a value which is integer times the extracted period and for designating a read address based on the sawtooth wave, wherein the input sound signal is read from the memory using the read address designated by the address designating means.
It may be arranged that the period extracting means counts one wavelength of the input sound signal with a sampling period to derive a counted value corresponding to the period of the input sound signal, and the address designating means sets the amplitude of the sawtooth wave to a value which is integer times the counted value.
According to another aspect of the present invention, there is provided a pitch shifting method comprising the steps of storing an input sound signal; extracting a period of the input sound signal;
producing a sawtooth wave having an amplitude set to a value which is integer times the extracted period; designating a read address based on the sawtooth wave; and reading the input sound signal from the memory using the read address.
It may be arranged that the step of extracting the period of the input sound signal comprises counting one wavelength of the input sound signal with a sampling period to derive a counted value corresponding to the period of the input sound signal, and the step of producing the sawtooth wave comprises setting the amplitude of the sawtooth wave to a value which is integer times the counted value.